<?php
/**
 * @ClassName: RedisLock
 * @Description: 请求结束后释放未正常释放的锁
 * @author: gydtrade
 * @Date: 2025-11-19 17:12
 * @Version: V1.0.0
 */

namespace app\common\middleware;

use app\common\logic\RedisLockLogic;
use Closure;
use think\Request;
use think\Response;

class RedisLock
{
    /**
     * 处理限制访问
     * @param Request $request
     * @param Closure $next
     * @param array $params
     * @return Response
     */
    public function handle(Request $request, Closure $next)
    {
        $response = $next($request);
        RedisLockLogic::checkUnexpectedKeys();
        return $response;
    }

}